<div id="DeveloperApps">
    <div class="wrap">
        <div class="page-header clearfix">
            <h4 class="pull-left">我的应用</h4>
            <div class="pull-right" >
                <a href ng-click="add()" class="btn btn-primary" >
                    <span class="glyphicon glyphicon-plus"></span> 新增
                </a>
                <a href ng-click="delete()" class="btn btn-danger delete" >
                    <span class="glyphicon glyphicon-trash"></span> 删除
                </a>
            </div>
        </div>

        <div class="table-responsive ">
            <table class="table table-manager">
                <thead>
                <tr >
                    <th  style="width:49px">
                        <input type="checkbox" ng-model="check_all" ng-change="checkAll()" />
                    </th>
                    <th style="width:57px">
                        序号
                    </th>
                    <th >
                        应用图标
                    </th>
                    <th>
                        应用名称
                    </th>
                    <th>
                        状态
                    </th>
                    <th >
                        对象
                    </th>
                    <th >
                        下载量
                    </th>
                    <th >
                        申请日期
                    </th>
                    <th >
                        轮播图
                    </th>
                    <th >
                        常用应用
                    </th>
                    <th>
                        是否下架
                    </th>
                </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="item in Apps" class="text-center">
                        <td>
                            <input type="checkbox" ng-model="item.checked" ng-change="checkOne()" />
                        </td>
                        <td style="width:57px" >
                            {{$index+1}}
                        </td>
                        <td>
                            <div class="edit" ng-click="openIconModal(item)">
                                <img lazy-src="{{imgApi+item.icon}}" alt='图标' width='38' height='38' ng-if="item.icon">
                                <span ng-if="!item.icon">添加图标</span>
                            </div>
                        </td>
                        <td class="text-left">
                            <div class="edit" ng-click="openModal(item)">
                                {{item.appName}}
                            </div>
                        </td>
                        <td class="text-left">
                            <span class="text-primary" ng-if="item.status == 0">待审核</span>
                            <span class="text-success" ng-if="item.status == 1">审核通过</span>
                            <span class="text-danger" ng-if="item.status == -1">审核不通过</span>
                        </td>
                        <td >
                            {{item.useObject}}
                        </td>
                        <td>
                            {{item.userNumber}}
                        </td>
                        <td >
                            {{item.updateTime | limitTo:19}}
                        </td>
                        <td >
                            <div class="edit" ui-sref="DeveloperMain.frame.DeveloperAppBanner({'id':item.id})">
                                进入
                            </div>
                        </td>
                        <td >
                            <div class="edit" ui-sref="DeveloperMain.frame.CommonApps({'id':item.id})">
                                进入
                            </div>
                        </td>
                        <td >
                            <button class="btn" ng-class="{0:'btn-default',1:'btn-primary'}[item.isOpen]" ng-click="isOpen(item.isOpen,item.id)" ng-if="item.status == 1">{{item.isOpen?'下架':'上架'}}</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
